﻿<%@ Page Title="" Language="C#" MasterPageFile="~/NewStdMasterPage.Master"
    AutoEventWireup="true" CodeBehind="GenerateNewPassword.aspx.cs" Inherits="AteneoLibri.Account.GenerateNewPassword" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Imposta nuova password
    </h2>
    <asp:Panel ID="pnlNewPassword" runat="server">
        <p>
            <asp:Label ID="lblNewPassword" runat="server" Text="Inserisci la nuova password"></asp:Label>
            <br />
            <asp:TextBox ID="txtNewPassword" runat="server" CssClass="StandardTextBox" TextMode="Password"></asp:TextBox>
            <asp:RequiredFieldValidator ID="rfvPassword" runat="server" ErrorMessage="* Campo obbligatorio"
                ControlToValidate="txtNewPassword" Display="Dynamic" CssClass="failureNotification">*</asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="revPassword" runat="server" ErrorMessage="** La password non rispetta i requisiti minimi"
                ValidationExpression="[\W\s\w\S]{6,15}" Display="Dynamic" ControlToValidate="txtNewPassword"
                CssClass="failureNotification" EnableClientScript="true">**</asp:RegularExpressionValidator>
        </p>
        <p>
            <asp:Label ID="lblConfirmNewPassword" runat="server" Text="Conferma la nuova password"></asp:Label>
            <br />
            <asp:TextBox ID="txtConfirmNewPassword" runat="server" CssClass="StandardTextBox" TextMode="Password"></asp:TextBox>
            <asp:RequiredFieldValidator ID="rfvConfirmPsw" runat="server" ErrorMessage="* Necessaria password di conferma"
                ControlToValidate="txtConfirmNewPassword" Display="Dynamic" CssClass="failureNotification">*</asp:RequiredFieldValidator>
            <asp:CompareValidator ID="cvPassword" runat="server" ErrorMessage="*** La password di conferma deve coincidere con la password"
                ControlToCompare="txtNewPassword" ControlToValidate="txtConfirmNewPassword" Display="Dynamic"
                CssClass="failureNotification">***</asp:CompareValidator>
        </p>
        <div style="margin-top:20px;">
            <asp:Button ID="btnNewPassword" runat="server" CssClass="StandardButton" Text="Cambia password" OnClick="btnNewPassword_Click" />&nbsp;
            <asp:Button ID="btnAnnulla" runat="server" CssClass="StandardButton" Text="Annulla" CausesValidation="false"
                OnClick="btnAnnulla_Click" />
        </div>
        <div>
            <asp:ValidationSummary ID="vsChangePassword" runat="server" DisplayMode="BulletList"
                CssClass="failureNotification" EnableClientScript="true" HeaderText="Attenzione:" />
        </div>
    </asp:Panel>
    <asp:Panel ID="pnlSentConfirmEmail" runat="server" Visible="false">
        <table>
            <tr>
                <td>
                    <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/icon-success.png" />
                </td>
                <td style="vertical-align: middle; padding-left: 20px;">
                    <asp:Label ID="Label1" Text="Password modificata con successo!" runat="server" CssClass="failureNotification"></asp:Label>
                </td>
            </tr>
        </table>
    </asp:Panel>
</asp:Content>
